using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace SysTables
{
    public partial class AddTableForm : Form
    {

        MainWindow mParent;

        public AddTableForm(MainWindow Parent)
        {
            mParent = Parent;
            InitializeComponent();
        }


        public void AddTable()
        {
            mTableName.Text = "";
            ShowDialog();
        }


        private void button1_Click(object sender, EventArgs e)
        {
            if (mTableName.Text.Length == 0) return;
            mParent.AddTable(mTableName.Text);
            Visible = false;
        }

        private void Cancel_Click(object sender, EventArgs e)
        {
            Visible = false;
        }
    }
}